/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

#include <IOmenFileUtils.h>
#include <vector>
#include <string>

#ifdef _WIN32
#include <Windows.h>
#elif defined(__APPLE__) && defined(__MACH__)
#endif

namespace Omen
{
    class FileUtils : public Omen::IFileUtils
    {
    public:
        FileUtils();
        virtual ~FileUtils();

        OMEN_API virtual bool findFiles( const std::wstring& searchPath, std::wstring& searchFileName, bool bRecursive = true );
        OMEN_API virtual void getFoundFiles( std::wstring listPaths[], unsigned long maxSize );
        OMEN_API virtual unsigned long filesFoundCount();
        OMEN_API virtual bool fileExists( const std::wstring& filePath );

        OMEN_API virtual INT64 getFileSize( const std::wstring& filePath );
    private:
        std::wstring m_filterPath;
        std::wstring m_filterFileName;
        
#ifdef _WIN32
        HANDLE          m_hFind;
        WIN32_FIND_DATA m_findFileData;
        bool            m_bRecursive;
        std::vector<std::wstring> m_listFoundFiles;

#elif defined(__APPLE__) && defined(__MACH__)
#endif
    };
}
/// EOF